#include "Bomberman.h"
#include "Include.h"


void bombermanInit(bomberman *pBomberman)
{
	pBomberman->x=1;
	pBomberman->y=1;
	pBomberman->vivant=1;
	pBomberman->bombe=1;
	pBomberman->direction=BAS;
}

void bombermanGauche(bomberman *pBomberman,const terrain *pTer)
{
	{
        pBomberman->x--;
    }
}

void bombermanDroite(bomberman *pBomberman,const terrain *pTer)
{
	if (terEstPositionPersoValide( pTer, pBomberman->x+1, pBomberman->y))
    {
        pBomberman->x++;
    }

}

void bombermanHaut(bomberman *pBomberman,const terrain *pTer)
{
	if (terEstPositionPersoValide( pTer, pBomberman->x, pBomberman->y-1))
    {
        pBomberman->y--;
    }

}

void bombermanBas(bomberman *pBomberman,const terrain *pTer)
{
	if (terEstPositionPersoValide( pTer, pBomberman->x, pBomberman->y+1))
    {
        pBomberman->y++;
    }

}

int bombermanGetX(const bomberman *pBomberman)
{
	return pBomberman->x;
}

int bombermanGetY(const bomberman *pBomberman)
{
	return pBomberman->y;
}

